package test_arrow 
{
	import com.greensock.easing.*;
	import com.greensock.*;
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.errors.IOError;
	import flash.events.Event;
	import flash.events.ProgressEvent;
	import flash.net.URLRequest;
	
	/**
	 * ...
	 * @author 
	 */
	public class test_arrow extends Sprite 
	{
		private var _loader:Loader;
		private var _urlRequest:URLRequest;
		private var _mc:MovieClip;
		
		public function test_arrow() 
		{
			_loader = new Loader();
			//_urlRequest = new URLRequest("assets/swf/welcomeShapes.swf");
			_urlRequest = new URLRequest("assets/swf/test_arrow.swf");
			_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, _onSwfLoaded);
			_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, _onSwfProgress);
			_loader.contentLoaderInfo.addEventListener(Event.ENTER_FRAME, _onEnterFrame);
			_loader.load(_urlRequest);
			
		}
		
		private function _onEnterFrame(e:Event):void 
		{
			trace(this, "** _onEnterFrame **");
			
			
		}
		
		private function _onSwfLoaded(e:Event):void 
		{
			trace(this, "** _onSwfLoaded **");
			_mc = MovieClip(e.currentTarget.content);
			//_mc.stop();
			//_mc.addEventListener(Event.ENTER_FRAME, _onEnterFrame);
			trace(this, "_onSwfLoaded", _mc.totalFrames);
			addChild(_mc);
			var myTween:TweenMax = new TweenMax(_mc, 20, { frame:_mc.totalFrames, ease:Linear.easeNone } );
			myTween.play();
		}
		
		private function _onSwfProgress(e:ProgressEvent):void 
		{
			//trace(this, "** _onSwfProgress **");
		}
		
	}

}